<?php $this->load->view('mypage/header'); ?>
<div id="wrapper" class="clearfix">
	<div id="main" class="clearfix">
		<div id="content">
			<div class="content-l">
				<div id="schedules">
					<ul id="tab-choose">
						<li><span for="today" class="selected" onclick='set_choose("today")';>今天</span></li>
						<li><span for="tomorrow" onclick='set_choose("tomorrow")';>明天</span></li> 
						<li><span for="week" onclick='set_choose("week");'>本周</span></li>
						<li><span for="all" onclick='set_choose("all");'>所有</span></li>
					</ul>
					<input type="hidden" style="width:0px;height:0px" id="choose" value="all"/>
					<input type="hidden" style="width:0px;height:0px" id="choose_cal" value="0"/>
					
					<ul id="list-cal">
						<?php $this->load->view('mypage/cal_list_form');?>		
					</ul>
					<?php 
					?>
				</div>
				<div id="categories">
					<h3>分类</h3>	
				</div>		
			</div>
			<div class="content-r">
				<!-- <div id="taskview">
					<marquee onmouseover="this.stop()" onmouseout="this.start()" scrollamount=4 direction=left height=30>可以显示最近添加的任务</marquee>	
				</div> -->
				<div id="container">
				</div>
			
				<div id="search-outer">
					<form id="location-search" onsubmit="search();return false;">
						<input class="textbox-rad" type="text" tabindex="1" id="txt-search"/>
						<span><input id="btn-search" type="submit" value="搜索"/></span>
						<div id="results"></div>
					</form>
				</div>
			</div>

			<?php $this->load->view('mypage/create_calender_form');?>
			
			<!--弹出框的关闭按钮-->
			<div style='display:none'> 
				<img src='../images/x.png' alt='' />
			</div>
			
		</div>
	</div>
</div>
<?php $this->load->view('mypage/footer'); ?>

<script type="text/javascript">
var map = new BMap.Map("container");
var point = new BMap.Point(<?php echo $location_x;?>,<?php echo $location_y;?>);
map.centerAndZoom(point, 12);
map.enableScrollWheelZoom();
function showInfo(e){
  flash_error_message(e.point.lng + ", " + e.point.lat);
}

map.addEventListener("click", showInfo);
//创建自定义控件
var myZoomCtrl = new ZoomControl();
//添加到地图当中
map.addControl(myZoomCtrl);

//搜索的方法
var local = new BMap.LocalSearch(map, options);


//将时间转换为24小时制
//function change_time(){
//	var time=document.getElementById("f_date1").value;
//	if (time[17]=='P')
//	{
//		if (time[11]+time[12]=="00"||time[11]+time[12]=="12")
//		{
//			document.getElementById("f_date1").value=time.substr(0,16);
//		}
//		else
//		{	
//			
//			var hour=String(parseInt(time[11]+time[12],10)+12);
//			var time_24=time.substr(0,11)+hour+time.substr(13,3);
//			document.getElementById("f_date1").value=time_24;
//		}
//	}
//	else
//	{
//		if(time[11]+time[12]=="00"||time[11]+time[12]=="12")
//		{
//			var time_24=time.substr(0,11)+"00"+time.substr(13,3);
//			document.getElementById("f_date1").value=time_24;
//		}
//		else
//		{ 
//			document.getElementById("f_date1").value=time.substr(0,16);
//		}
//	}
//}

//下拉选择框
//var mySelect=new mSelect('mySelect','../css/mSelect.css');
//window.onload=function(){
//	var aS=document.getElementsByTagName('select');
//	for (var i=0;i<aS.length;i++){
//		switch(aS[i].getAttribute('mSty')){
//			case 'redLine':
//				mySelect.Create(aS[i],'redLine');
//				break;
//			case 'blueCircle':
//				mySelect.Create(aS[i],'blueCircle',true);
//				break;
//			case 'orangeHeart':
//				mySelect.Create(aS[i],'orangeHeart',true);
//				break;
//		}
//	}
//};


function openSchadule(){
  	$('#basic-modal-content').modal();
}

//show_marker()方法在cal_list_form中定义
//set_choose()方法在cal_list_form中定义
</script>
